import {
  Map,
  AnyLayer,
  CircleLayer,
  FillExtrusionLayer,
  FillLayer,
  LineLayer,
  SymbolLayer,
} from "mapbox-gl";
export interface IFeature {
  center: string;
  createTime: string;
  geometry: any;
  id: number;
  img: string;
  name: string;
  pid: string;
  properties: any;
  status: number;
  updateTime: number;
}
export interface IColumn {
  name: string;
  key: string;
  type: string;
  required: boolean;
}
export interface ILayer {
  id: number;
  createTime: string;
  updateTime: string;
  name: string;
  pid: string;
  img: string;
  type: "Point" | "LineString" | "Polygon";
  visible: boolean;
  properties: any;
  style: any;
  // style: CircleLayer | FillExtrusionLayer | FillLayer | LineLayer | SymbolLayer;
  features: IFeature[];
  columns: IColumn[];
}
export interface IDataset {
  id: number;
  createTime: string;
  updateTime: string;
  pid: string;
  name: string;
  img: string;
  location: any;
  scale: number;
  status: number;
  layers: Array<ILayer>;
  style: string;
}
export const statusMap = [
  {
    label: "待提交",
    value: 0,
    type: "info",
  },
  {
    label: "待审核",
    value: 1,
    type: "warning",
  },
  {
    label: "审核通过",
    value: 2,
    type: "success",
  },
  {
    label: "审核失败",
    value: 3,
    type: "error",
  },
];
